/*
 * Copyright (c) Family. All Rights Reserved
 */

package com.driving.exam.entity;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.type.Alias;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Getter;
import lombok.Setter;

/**
 * @author SAGITTAR
 */
@Getter
@Setter
@Alias(value = "School")
@TableName(value = "tb_school")
public class School extends Model<School> {

    private static final long serialVersionUID = 6569914370967645893L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name = StringUtils.EMPTY;

    @TableField(value = "detail")
    private String detail = StringUtils.EMPTY;

    @TableField(value = "price")
    private String price = StringUtils.EMPTY;

    @TableField(value = "telephone")
    private String telephone = StringUtils.EMPTY;

    @TableField(value = "big_area")
    private String bigArea = StringUtils.EMPTY;

    @TableField(value = "small_area")
    private String smallArea = StringUtils.EMPTY;

    @TableField(value = "address")
    private String address = StringUtils.EMPTY;

    @TableField(value = "cover_url")
    private String coverUrl = StringUtils.EMPTY;

    @TableField(value = "school_url")
    public String schoolUrl = StringUtils.EMPTY;

    @Override
    public Serializable pkVal() {
        return id;
    }
}
